package com.cie2.map.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.tapestry5.beaneditor.NonVisual;
import org.apache.tapestry5.beaneditor.Validate;

import com.cie2.map.entities.User.AccessLevel;

@Entity
@Table(name="user_profile")
public class UserProfile {

	private Long id;
	
	
//	private User user;
	
	private AccessLevel accessLevel;


	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NonVisual			
	public Long getId() {
		return id;
	}
	

	@Validate("required")
	public AccessLevel getAccessLevel() {
		return accessLevel;
	}



//    @ManyToOne(targetEntity=User.class)
//    @JoinColumn(name="USER_ID")
//	public User getUser() {
//		return user;
//	}

	public void setId(Long id) {
		this.id = id;
	}



//	public void setUser(User user) {
//		this.user = user;
//	}

	public void setAccessLevel(AccessLevel accessLevel) {
		this.accessLevel = accessLevel;
	}

	
}
